package org.teacher.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import lombok.*;

/**
 * <p>
 * 
 * </p>
 *
 * @author 张老师
 * @since 2024-09-10
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Permission implements Serializable {
    private static final long serialVersionUID = 1L;
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    private Long pid;
    private String code;
    private String name;

    private String resource;


    @TableField(exist = false)  //表示该字段children在数据库里面不需要存在
    private List<Permission> children=new ArrayList<>();
}
